package com.mj.jk.pojo.query;

import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class PageQuery<T>{
    private static final int DEFAULT_PAGE_SIZE = 10;

    private long page;
    private long size;

    private long count;

    private long pages;


    private List<T> data;

    public long getPage() {
        return Math.max(1, page);

    }

    public long getSize() {
        return (size<1)? DEFAULT_PAGE_SIZE : size;
    }
}
